package com.smartx.app.model;

import org.json.JSONObject;

public class TransferNonce {
    public String nonce;
    public String timestamp;

    public static TransferNonce getTranferNonce(String json){
        TransferNonce tranferNonce = new TransferNonce();
        try{
            JSONObject jsonObject = new JSONObject(json);
            JSONObject resultJsonObject = jsonObject.getJSONObject("result");
            tranferNonce.nonce = resultJsonObject.getString("nonce");
            tranferNonce.timestamp = resultJsonObject.getString("timestamp");
            return tranferNonce;
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }

}
